package com.lmy.androidcustomview.view

import android.content.Context
import android.graphics.Canvas
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.util.AttributeSet
import android.view.View
import com.lmy.androidcustomview.dp

/**
 * @author
 * @功能:
 * @Creat 2/11/21 11:35 AM
 * @Compony 465008238@qq.com
 */


class DrawableView(context: Context, attributeSet: AttributeSet) : View(context, attributeSet) {
    val drawable = MeshDrawable()
    override fun onDraw(canvas: Canvas) {
        super.onDraw(canvas)
        drawable.setBounds(50.dp.toInt(), 80.dp.toInt(), width, height)
        drawable.draw(canvas)
    }
}